﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security;
using System.Runtime.InteropServices;
using VSIXUtilities.DataObjects.Enums;

namespace VSIXUtilities.Helpers
{
	[SuppressUnmanagedCodeSecurityAttribute]
	internal static class SafeNativeMethods
	{
		[System.Runtime.InteropServices.DllImport("gdi32.dll")]
		[return: MarshalAs(UnmanagedType.Bool)]
		public static extern bool DeleteObject(IntPtr hObject);

		[DllImport("comctl32.dll", SetLastError = true)]
		public static extern int ImageList_GetImageCount(HandleRef himl);

		[DllImport("comctl32.dll", SetLastError = true)]
		[return: MarshalAs(UnmanagedType.Bool)]
		public static extern bool ImageList_Draw(HandleRef himl, int i, HandleRef hdcDst, int x, int y, int fStyle);

		[DllImport("comctl32.dll", SetLastError = true)]
		public static extern IntPtr ImageList_GetIcon(IntPtr ImageListHandle, int IconIndex, FStyle FStyle);

	}
}
